
var id=2;//员工id
var obj=JSON.parse(sessionStorage.getItem("customer"));
var id=obj.id;
//留言列表

function message() {

    $.ajax({
        url: "/meeting/checkMessageArrangement",
        type: "POST",
        data:{"id":id},
        dataType: "json",
        success:function (result) {
            var str="";

            if (result!=null) {
                for (var i = 0; i < result.length; i++) {
                    if (i>4){
                        break;
                    }else {
                        str += "<tr>\n" +
                            "\n" +
                            "            <td>" + result[i].title + "</td>\n" +
                            "            <td>" + result[i].onlinuemessage + "</td>\n" +
                            "\n" +
                            "\n" +
                            "        </tr>";
                    }

                }

            }
            $(".tablelist:eq(0) tbody").html(str);
        }

    });

}

//参会会议信息列表

function meeting() {
    $.ajax({
        url: "/meeting/checkPersonalArrangement",
        type: "POST",
        data:{"id":id},
        dataType: "json",
        success:function (result) {
            var str="";
            if (result!=null) {
                for (var i = 0; i < result.length; i++) {
                    if (i>4){
                        return;
                    }
                    str += "<tr>\n" +
                        "\n" +
                        "            <td>" + result[i].title + "</td>\n" +
                        "            <td>" + result[i].meetRoomName + "</td>\n" +
                        "            <td>" + result[i].name + "</td>\n" +
                        "            <td>" + result[i].time + "</td>\n" +
                        "            <td>" + result[i].entime + "</td>\n" +
                        "\n" +
                        "\n" +
                        "        </tr>";
                }

            }
            $(".tablelist:eq(1) tbody").html(str);

        }

    });
}
//工作安排列表
function work() {
    $.ajax({
        url: "/meeting/checkWorkArrangement",
        type: "POST",
        data:{"id":id},
        dataType: "json",
        success:function (result) {
            var str="";

            if (result!=null) {
                for (var i = 0; i < result.length; i++) {
                    if (i>4){
                        break;
                    }else {
                        str += "<tr>\n" +
                            "\n" +
                            "            <td>" + result[i].scheduletitle + "</td>\n" +
                            "            <td>" + result[i].Scheduledate + "</td>\n" +
                            "\n" +
                            "\n" +
                            "        </tr>";
                    }

                }

            }
            $(".tablelist:eq(2) tbody").html(str);
        }

    });
}

$(function () {
    meeting();
    message();
    work();
})